Ext.define('Intranet.Desktop.view.MainScreen', {
    extend: 'Ext.panel.Panel',
    renderTo: Ext.get('mainscreen'),
    width: 1100,
    border: false,
    id: 'mainscreen',
    style: 'margin-bottom: 25px;',
    defaults: {
        border: false,
        margin: '10 0 0 0'
    },
    items: [{
            xtype: 'panel',
            width: 1100,
            height: 25,
            defaults: {
                style: 'float: right;'
            },
            items: [{
                    xtype: 'button',
                    text: 'Toolbox',
                    width: 65,
                    pressed: true,
                    enableToggle: true,
                    action: 'showHideToolbox',
                    id: 'toolboxBtn'

                }, {
                    xtype: 'toolbox'
                }]

        }, {
            xtype: 'desktop_companypanel'

        }, {
            xtype: 'desktop_teamgroupspanel'

        }, {
            xtype: 'desktop_personalpanel'

        }],
    listeners: {
        afterrender: function(thisCmp, opts) {

            var panels = thisCmp.query('panel > panel');

            for (var i = 0; i < panels.length; i++)
            {
                if (panels[i].getHeader()) {
                    panels[i].getHeader().getEl().applyStyles({
                        borderRadius: '7px 7px 0 0'
                    });
                }
            }

            
        }

    }
});
